<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        let num = 0;
        let timer = null;
        function m() {
            document.title = ++ num;
            timer = setTimeout(m, 50);
        }
        timer = setTimeout(m, 50);
        window.onblur = function() {
            clearTimeout(timer);
        }
        window.onfocus = function() {
            clearTimeout(timer);
            m();
        }


        setInterval(function () {
            for (let index = 0; index < 10000; index++) {
                const element = array[index];
                
            }
        },1000)


        // let num = 0;
        // function m() {
        //     document.title = ++num;
        //     requestAnimationFrame(m);
        // }
        // requestAnimationFrame(m);

    </script>
</body>
</html>